package com.zmn.mcc.common.dictionary;

import com.google.common.collect.Lists;
import com.zmn.common.dictionary.DictModel;
import com.zmn.mcc.common.constant.StaffArchivesConsts;

import java.util.ArrayList;
import java.util.List;

/**
 * @author quanjic
 * @version v1.0
 * @since 2019/10/15 19:48
 **/
public class StaffArchivesDict {

    /**
     * 描述:户籍类型1.本地城镇，2.本地农村, 3.外地城镇（省内）4.外地农村（省内）, 5.外地城镇（省外）,6.外地农村（省外）
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getResidenceTypeList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(6);
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY, StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE, StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY, StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE, StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY, StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE, StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE_STR));
        return arrayList;
    }

    public static String getResidenceTypeName(Integer residenceType) {
        switch (residenceType) {
            case StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY:
                return StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY_STR;
            case StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE:
                return StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE_STR;
            case StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY:
                return StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY_STR;
            case StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE:
                return StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE_STR;
            case StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY:
                return StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY_STR;
            case StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE:
                return StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE_STR;
            default:
                return "";
        }
    }

    public static int getResidenceTypeByName(String residenceTypeName) {
        switch (residenceTypeName) {
            case StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_CITY;
            case StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_LOCAL_COUNTRYSIDE;
            case StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_CITY;
            case StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_IN_PROVINCE_COUNTRYSIDE;
            case StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_CITY;
            case StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE_STR:
                return StaffArchivesConsts.RESIDENCE_TYPE_OUT_PROVINCE_COUNTRYSIDE;
            default:
                return 0;
        }
    }

    /**
     * 描述:最高学历：1.小学，2.初中，3.高中，4.中专，5.大专，6.本科，7.硕士，8.博士，9.其他
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getHighestEduList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(9);
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL, StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL, StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL, StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL, StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE, StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE, StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_MASTER, StaffArchivesConsts.HIGHEST_EDU_MASTER_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_DOCTOR, StaffArchivesConsts.HIGHEST_EDU_DOCTOR_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.HIGHEST_EDU_OTHER, StaffArchivesConsts.HIGHEST_EDU_OTHER_STR));
        return arrayList;
    }

    public static String getHighestEduName(Integer highestEdu) {
        switch (highestEdu) {
            case StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL:
                return StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL_STR;
            case StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL:
                return StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL_STR;
            case StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL:
                return StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL_STR;
            case StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL:
                return StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL_STR;
            case StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE:
                return StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE_STR;
            case StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE:
                return StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE_STR;
            case StaffArchivesConsts.HIGHEST_EDU_MASTER:
                return StaffArchivesConsts.HIGHEST_EDU_MASTER_STR;
            case StaffArchivesConsts.HIGHEST_EDU_DOCTOR:
                return StaffArchivesConsts.HIGHEST_EDU_DOCTOR_STR;
            case StaffArchivesConsts.HIGHEST_EDU_OTHER:
                return StaffArchivesConsts.HIGHEST_EDU_OTHER_STR;
            default:
                return "";
        }
    }

    public static int getHighestEduByName(String highestEduName) {
        switch (highestEduName) {
            case StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL_STR:
                return StaffArchivesConsts.HIGHEST_EDU_PRIMARY_SCHOOL;
            case StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL_STR:
                return StaffArchivesConsts.HIGHEST_EDU_MIDDLE_SCHOOL;
            case StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL_STR:
                return StaffArchivesConsts.HIGHEST_EDU_HIGH_SCHOOL;
            case StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL_STR:
                return StaffArchivesConsts.HIGHEST_EDU_POLYTECHNIC_SCHOOL;
            case StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE_STR:
                return StaffArchivesConsts.HIGHEST_EDU_JUNIOR_COLLEGE;
            case StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE_STR:
                return StaffArchivesConsts.HIGHEST_EDU_UNDERGRADUATE;
            case StaffArchivesConsts.HIGHEST_EDU_MASTER_STR:
                return StaffArchivesConsts.HIGHEST_EDU_MASTER;
            case StaffArchivesConsts.HIGHEST_EDU_DOCTOR_STR:
                return StaffArchivesConsts.HIGHEST_EDU_DOCTOR;
            case StaffArchivesConsts.HIGHEST_EDU_OTHER_STR:
                return StaffArchivesConsts.HIGHEST_EDU_OTHER;
            default:
                return 0;
        }
    }

    /**
     * 描述:员工类型
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getMarriageStatusList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(5);
        arrayList.add(new DictModel(StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED, StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.MARRIAGE_STATUS_MARRIED, StaffArchivesConsts.MARRIAGE_STATUS_MARRIED_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE, StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT, StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION, StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION_STR));
        return arrayList;
    }

    public static String getMarriageStatusName(Integer marriageStatus) {
        switch (marriageStatus) {
            case StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED:
                return StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED_STR;
            case StaffArchivesConsts.MARRIAGE_STATUS_MARRIED:
                return StaffArchivesConsts.MARRIAGE_STATUS_MARRIED_STR;
            case StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE:
                return StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE_STR;
            case StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT:
                return StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT_STR;
            case StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION:
                return StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION_STR;
            default:
                return "";
        }
    }

    public static int getMarriageStatusByName(String marriageStatusName) {
        switch (marriageStatusName) {
            case StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED_STR:
                return StaffArchivesConsts.MARRIAGE_STATUS_UNMARRIED;
            case StaffArchivesConsts.MARRIAGE_STATUS_MARRIED_STR:
                return StaffArchivesConsts.MARRIAGE_STATUS_MARRIED;
            case StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE_STR:
                return StaffArchivesConsts.MARRIAGE_STATUS_DIVORCE;
            case StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT_STR:
                return StaffArchivesConsts.MARRIAGE_STATUS_BEREAVEMENT;
            case StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION_STR:
                return StaffArchivesConsts.MARRIAGE_STATUS_SEPARATION;
            default:
                return 0;
        }
    }


    /**
     * 描述:员工类型
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getPoliticalStatusList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(4);
        arrayList.add(new DictModel(StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER, StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER, StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE, StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE_STR));
        arrayList.add(new DictModel(StaffArchivesConsts.POLITICAL_STATUS_OTHER, StaffArchivesConsts.POLITICAL_STATUS_OTHER_STR));
        return arrayList;
    }

    public static String getPoliticalStatusName(Integer politicalStatus) {
        switch (politicalStatus) {
            case StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER:
                return StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER_STR;
            case StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER:
                return StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER_STR;
            case StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE:
                return StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE_STR;
            case StaffArchivesConsts.POLITICAL_STATUS_OTHER:
                return StaffArchivesConsts.POLITICAL_STATUS_OTHER_STR;
            default:
                return "";
        }
    }

    public static int getPoliticalStatusByName(String politicalStatusName) {
        switch (politicalStatusName) {
            case StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER_STR:
                return StaffArchivesConsts.POLITICAL_STATUS_LEAGUE_MEMBER;
            case StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER_STR:
                return StaffArchivesConsts.POLITICAL_STATUS_PARTY_MEMBER;
            case StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE_STR:
                return StaffArchivesConsts.POLITICAL_STATUS_THE_COMMON_PEOPLE;
            case StaffArchivesConsts.POLITICAL_STATUS_OTHER_STR:
                return StaffArchivesConsts.POLITICAL_STATUS_OTHER;
            default:
                return 0;
        }
    }

}
